import java.lang.*;
public class Main {

    public static int getTogether(int num){
        int res=0;
        while(num!=0){
            int tmp=num%10;
            res+=tmp;
            num/=10;
        }
        return res;
    }
    public static void main(String[] args) {
        
        System.out.print(getTogether(58));
    }
}
